<template>
  <div class="b-header">
    <el-row class="block-col-2">
      <el-col :span="4">
        <el-dropdown trigger="click" @command="handleCommand">
          <span class="el-dropdown-link">
            Bliss
            <i class="el-icon-arrow-down el-icon--right"></i>
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item icon="el-icon-s-check">操作记录</el-dropdown-item>
            <el-dropdown-item icon="el-icon-plus">修改密码</el-dropdown-item>
            <el-dropdown-item icon="el-icon-error" command="logout"
              >退出登录</el-dropdown-item
            >
          </el-dropdown-menu>
        </el-dropdown>
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  name: "BHeader",
  methods: {
    handleCommand(command) {
      command == "logout" && this.logout();
    },
    logout() {
      this.$router.push({ path: "/login" });
    }
  }
};
</script>
<style scoped>
div {
  height: 100%;
}
.b-header,
.el-row,
.logo,
.logo img {
  width: 100%;
  height: 100%;
  padding: 6px 0;
}
.el-dropdown-link {
  cursor: pointer;
  color: #409eff;
}
.el-icon-arrow-down {
  font-size: 12px;
}
.demonstration {
  display: block;
  color: #8492a6;
  font-size: 14px;
  margin-bottom: 20px;
}
[class*="el-col-"] {
  float: right;
}
</style>
